package com.example.add8_17.presenter;

import com.example.add8_17.base.BasePresenter;
import com.example.add8_17.bean.HomeBean;
import com.example.add8_17.model.HomeCallBack;
import com.example.add8_17.model.HomeModel;
import com.example.add8_17.view.HomeView;

public class HomePresenter extends BasePresenter<HomeView> implements HomeCallBack {
    private HomeModel model;
    @Override
    protected void initModel() {
        this.model=new HomeModel();
        addModel(model);
    }
    public void getdata(int page){
        model.homedata(this,page);
    }
    @Override
    public void onSuccess(HomeBean homedata) {
        mview.onSuccess(homedata);
    }

    @Override
    public void onFali(String error) {
        mview.onFali(error);
    }
}
